#!/bin/bash
cd /local/group3705/dbgen
for f in $(ls *.tbl)
do
  sed 's/|$//' $f > $f.1
  mv $f.1 $f
done